/*
 * @Author: chenr 526963089@qq.com
 * @Date: 2023-02-10 16:06:23
 * @LastEditors: chenr 526963089@qq.com
 * @LastEditTime: 2023-02-10 18:41:00
 * @Description:
 */
import request from '@/utils/request/request';
import type { TreeInterface } from '@/mock/services/user/types';

export enum SiteAPI {
  routers = '/chiway-system/menu/portal-routers', // 获取菜单路由
}

/* 获取权限 */
export const rules = (menuType: string = 'official') => {
  return request.get<TreeInterface[]>({
    url: SiteAPI.routers,
    params: { menuType },
  });
};
